package com.hanfb.mall.inventory.controller;

import com.hanfb.mall.inventory.model.User;
import com.hanfb.mall.inventory.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpMethod;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @作者： Hanfb
 * @描述：
 * @时间： 2020年09月24日
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    UserService userService;

    @RequestMapping(value = "/findUser",method = RequestMethod.GET)
    public User findUser(){
        System.out.println(userService.findUser());
        return userService.findUser();

    }

    @RequestMapping(value = "/getCachedUser",method = RequestMethod.GET)
    public User getCachedUser(){
        System.out.println(userService.getCachedUser());
        return userService.getCachedUser();

    }
}
